<?php
    //获取数据
    $e_proName = $_GET["pro_name"];

    //连接数据库
    $db = new mysqli("localhost","root","123456","shopping_center");

    //设置添加sql语句
    // $sql = "INSERT INTO products (pro_name,pro_price,pro_imgpath,pro_color,pro_size,pro_num,pro_status) VALUES ( '{$pro_name}','{$pro_price}','{$pro_imgpath}','{$pro_color}','{$pro_size}','{$pro_num}','{$pro_status}')";
    $sql = "";    //注意: ??where后面的条件有问题


    //执行sql语句
    $flag = $db->query($sql);

    //判断数据库操作是否成功
    if( $flag ){
        echo '{"ok":true}';
    }else{
        echo '{"ok":false}';
    }
?>